﻿@model  NB.MGJ.Model.AntiFleeing_ProcessingType
@{
    Layout = null;
}
@*待处理调货状态*@
<script src="~/Scripts/MGJJS/FleeGoods/CommonBox.js"></script>
<style>
    .form-horizontal .form-group {
        margin-bottom: 20px;
    }
</style>
<form class="form-horizontal" id="form" onkeydown="if(event.keyCode==13){return false;}">
    <div class="form-group">
        <label class="col-sm-2 control-label">申请编码：</label>
        <div class="col-sm-4">
            @Html.TextBoxFor(p => p.FormCode, new { @class = "form-control", @placeholder = "退货编码", maxlength = 64, @id = "FormCode", disabled = "disabled", name = "FormCode" })
        </div>

        <label class="col-sm-2 control-label">产品名称：</label>
        <div class="col-sm-4">
            @Html.TextBoxFor(p => p.ProductName, new { @class = "form-control", @placeholder = "产品名称", maxlength = 64, disabled = "disabled" })
        </div>
    </div>
    <div class="form-group">

        <label class="col-sm-2 control-label">申请数量：</label>
        <div class="col-sm-4">
            @Html.TextBoxFor(p => p.Num, new { @class = "form-control", @placeholder = "退货数量", maxlength = 64, disabled = "disabled" })
        </div>
        <label class="col-sm-2 control-label">申请人：</label>
        <div class="col-sm-4">
            @Html.TextBoxFor(p => p.CreateLoginName, new { @class = "form-control", @placeholder = "申请人", maxlength = 64, disabled = "disabled" })
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">经销商名称：</label>
        <div class="col-sm-4">
            @Html.TextBoxFor(p => p.DistributorName, new { @class = "form-control", @placeholder = "经销商名称", maxlength = 64, disabled = "disabled" })
        </div>
        <label class="col-sm-2 control-label">经销商级别：</label>
        <div class="col-sm-4">
            @Html.TextBoxFor(p => p.LevelName, new { @class = "form-control", @placeholder = "经销商级别", maxlength = 64, disabled = "disabled" })
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">所属片区：</label>
        <div class="col-sm-4">
            @Html.TextBoxFor(p => p.SaleAreaName, new { @class = "form-control", @placeholder = "所属片区", maxlength = 64, disabled = "disabled" })
        </div>
        @if (Model.Type == 2)
        {
            <label class="col-sm-2 control-label">收货仓库：</label>
            <div class="col-sm-4">
                @*@Html.TextBoxFor(p => p.WarehouseId, new { @class = "form-control", @placeholder = "收货仓库", maxlength = 64, })*@
                @Html.DropDownList("WarehouseId", null, new { @class = "form-control", id = "WarehouseId" })
            </div>
        }

    </div>
    <div class="form-group">

        <label class="col-sm-2 control-label">查看物流码：</label>
        <div class="col-sm-4">
            <a href="#" onclick="$.MGJ.CommonBox.Dialog_CommonBox('@Model.FilePath')">查看物流码</a>
        </div>
    </div>
    @Html.HiddenFor(p => p.Type, new { @id = "Type" })

</form>

<script>
    $('#form').bootstrapValidator({
        fields: {
            ProductName: {
                validators: {
                    notEmpty: {
                        message: '产品名称不能为空'
                    },
                }
            },
            WarehouseId: {
                Distributor: {
                    validators: {
                        notEmpty: {
                            message: '收货仓库不能为空'
                        },
                    }
                },
            }
        }
    });
</script>
